-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add tests for invalid variant metadata and value #7885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c328d89 to
1a3ac22
Compare
1a3ac22 to
3878891
Compare
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me -- thanks @viirya
friendlymatthew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thank you @viirya
| assert!(err.is_err()); | ||
| let err = err.unwrap_err(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: assert! and unwrap_err will both panic if the result is not an error. Seems redundant?
(above as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's maybe clean it up in a follow on PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you meant to remove assert!(err.is_err());? Yea, let's remove it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, maybe we can make a follow on PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The follow on pr #7897
|
Thanks everyone! |
|
Thanks @alamb @friendlymatthew @mbrobbel @scovich |
# Which issue does this PR close? None # Rationale for this change Address the comment #7885 (comment). # What changes are included in this PR? Remove redundant `is_err` checks. # Are these changes tested? Existing tests. # Are there any user-facing changes? None Co-authored-by: Liang-Chi Hsieh <[email protected]> Co-authored-by: Andrew Lamb <[email protected]>
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Added new tests for invalid variant metadata and value.
Are these changes tested?
Yes, added new tests.
Are there any user-facing changes?
No